import axios from 'axios';
import qs from 'qs';

const http = axios.create({
    baseURL: "http://127.0.0.1:4523/m1/866120-2050013-default"
});

export const get = async (url, params) => {
    let res = await (await http.get(url, qs.stringify(params))).data;
    return res;
}

export const post = async (url, params) => {
    let res = await (await http.post(url, JSON.stringify(params))).data;
    return res;
}